export default {
  namespaced: true,
  state: () => ({
    count: 0
  }),
  getters: {
    doubleCount(state, getters, rootState) {
      console.log(state, getters, rootState);
      return state.count * 2;
    }
  },
  mutations: {
    increment(state) {
      // 这里的 `state` 对象是模块的局部状态
      state.count++;
    }
  },
  actions: {
    incrementA({ state, commit, rootState }) {
      console.log(state, commit, rootState);
      // commit('increment')
    }
  }
};
